package com.hpu.parser;

import org.json.JSONArray;
import org.json.JSONException;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Liu ZhuangFei on 2018/3/23.
 */

public class BodyScoreParser {
    public List<String> parse(String json){
        List<String> list=new ArrayList<>();
        try {
            JSONArray array=new JSONArray(json);
            for(int i=0;i<array.length();i++){
                String str="";
                JSONArray array1=array.getJSONArray(i);
                for (int j=0;j<array1.length();j++){
                    str+=array1.getString(j);
                    str+="\n";
                }
                list.add(str);
            }
        } catch (JSONException e) {
            e.printStackTrace();
        }

        return  list;
    }
}
